import { addColumnEllipsis, dateRender } from "utils/common";
const columnWidth = 80;

let columns = [
   {
    dataIndex: "code",
    title: "标题"
  },
  {
    dataIndex: "name",
    title: "标题"
  },
  {
    dataIndex: "num",
    title: "数量"
  },
  {
    dataIndex: "type",
    title: "类型",
    scopedSlots: { customRender: "type" }
  },
  {
    dataIndex: "categoryId",
    title: "商品类型",
    scopedSlots: { customRender: "categorySlots" }
  },
  {
    dataIndex: "orderAmount",
    title: "满足金额"
  },
  {
    dataIndex: "subAmount",
    title: "满减金额"
  },
  {
    dataIndex: "startDate",
    title: "开始时间"
  },
  {
    dataIndex: "endDate",
    title: "结束时间"
  },
  {
    dataIndex: "remark",
    title: "备注"
  },
  {
    dataIndex: "stat",
    title: "状态",
    scopedSlots: { customRender: "status" }
  },
  {
    dataIndex: "recommend",
    title: "是否推荐",
    align: "center",
    scopedSlots: { customRender: "recommend" },
    width: 60
  },
  {
    dataIndex: "createTime",
    title: "创建时间"
  },
  {
    dataIndex: "operation",
    title: "操作",
    scopedSlots: { customRender: "operation" }
  }
];

columns = addColumnEllipsis(columns);
export default columns;
